package se.chalmers.tda366.crumble.core.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.swing.JPanel;

import se.chalmers.tda366.crumble.core.ICategory;
import se.chalmers.tda366.crumble.core.IFeed;



public class Category implements ICategory, Serializable {

	private String name;
	private List<IFeed> feedList;
	private JPanel panel;
	
	public Category(String name, List<IFeed> list){
		this.name=name;
		feedList=list;
		
	}
	
	public Category(String name) {
		this.name = name;
		feedList = new ArrayList<IFeed>();
	}
	
	public void addFeed(IFeed feed) {
		feedList.add(feed);
	}
	
	public List<IFeed> getFeeds() {
		return feedList;
	}

	public String getName() {
		return name;
	}
	
	@Override
	public String toString() {
		return name;
	}

	@Override
	public JPanel getPanel() {
		return panel;
	}

	@Override
	public void setPanel(JPanel panel) {
		this.panel = panel;
	}

}
